package com.example.learnx.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户表
 * @TableName sys_user
 */
@TableName(value ="sys_user")
@Data
public class SysUser implements Serializable {
    /**
     * 主键id
     */
    @TableId(value = "id")
    private String id;

    /**
     * 登录账号
     */
    @TableField(value = "username")
    private String username;

    /**
     * 真实姓名
     */
    @TableField(value = "realname")
    private String realname;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * md5密码盐
     */
    @TableField(value = "salt")
    private String salt;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 年级
     */
    @TableField(value = "grade")
    private Integer grade;

    /**
     * 班级
     */
    @TableField(value = "clazz")
    private String clazz;

    /**
     * 总学时
     */
    @TableField(value = "total")
    private Double total;

    /**
     * 创新创业素质学时
     */
    @TableField(value = "innovation")
    private Double innovation;

    /**
     * 思想品德素质学时
     */
    @TableField(value = "thought")
    private Double thought;

    /**
     * 身心素质学时
     */
    @TableField(value = "body_mind")
    private Double bodyMind;

    /**
     * 法律素养学时
     */
    @TableField(value = "law")
    private Double law;

    /**
     * 文体素质学时
     */
    @TableField(value = "culture_sports")
    private Double cultureSports;

    /**
     * 生日
     */
    @TableField(value = "birthday")
    private Date birthday;

    /**
     * 性别(0-默认未知,1-男,2-女)
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 电子邮件
     */
    @TableField(value = "email")
    private String email;

    /**
     * 电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 机构编码
     */
    @TableField(value = "org_code")
    private String orgCode;

    /**
     * 部门名称
     */
    @TableField(value = "org_code_txt")
    private String orgCodeTxt;

    /**
     * 状态(1-正常,2-冻结)
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 删除状态(0-正常,1-已删除)
     */
    @TableField(value = "del_flag")
    private Integer delFlag;

    /**
     * 第三方登录的唯一标识
     */
    @TableField(value = "third_id")
    private String thirdId;

    /**
     * 第三方类型
     */
    @TableField(value = "third_type")
    private String thirdType;

    /**
     * 同步工作流引擎(1-同步,0-不同步)
     */
    @TableField(value = "activiti_sync")
    private Integer activitiSync;

    /**
     * 工号，唯一键
     */
    @TableField(value = "work_no")
    private String workNo;

    /**
     * 职务，关联职务表
     */
    @TableField(value = "post")
    private String post;

    /**
     * 座机号
     */
    @TableField(value = "telephone")
    private String telephone;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 身份（1普通成员 2上级）
     */
    @TableField(value = "user_identity")
    private Integer userIdentity;

    /**
     * 负责部门
     */
    @TableField(value = "depart_ids")
    private String departIds;

    /**
     * 多租户标识
     */
    @TableField(value = "rel_tenant_ids")
    private String relTenantIds;

    /**
     * 设备ID
     */
    @TableField(value = "client_id")
    private String clientId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysUser other = (SysUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getRealname() == null ? other.getRealname() == null : this.getRealname().equals(other.getRealname()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
            && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
            && (this.getGrade() == null ? other.getGrade() == null : this.getGrade().equals(other.getGrade()))
            && (this.getClazz() == null ? other.getClazz() == null : this.getClazz().equals(other.getClazz()))
            && (this.getTotal() == null ? other.getTotal() == null : this.getTotal().equals(other.getTotal()))
            && (this.getInnovation() == null ? other.getInnovation() == null : this.getInnovation().equals(other.getInnovation()))
            && (this.getThought() == null ? other.getThought() == null : this.getThought().equals(other.getThought()))
            && (this.getBodyMind() == null ? other.getBodyMind() == null : this.getBodyMind().equals(other.getBodyMind()))
            && (this.getLaw() == null ? other.getLaw() == null : this.getLaw().equals(other.getLaw()))
            && (this.getCultureSports() == null ? other.getCultureSports() == null : this.getCultureSports().equals(other.getCultureSports()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getOrgCode() == null ? other.getOrgCode() == null : this.getOrgCode().equals(other.getOrgCode()))
            && (this.getOrgCodeTxt() == null ? other.getOrgCodeTxt() == null : this.getOrgCodeTxt().equals(other.getOrgCodeTxt()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getThirdId() == null ? other.getThirdId() == null : this.getThirdId().equals(other.getThirdId()))
            && (this.getThirdType() == null ? other.getThirdType() == null : this.getThirdType().equals(other.getThirdType()))
            && (this.getActivitiSync() == null ? other.getActivitiSync() == null : this.getActivitiSync().equals(other.getActivitiSync()))
            && (this.getWorkNo() == null ? other.getWorkNo() == null : this.getWorkNo().equals(other.getWorkNo()))
            && (this.getPost() == null ? other.getPost() == null : this.getPost().equals(other.getPost()))
            && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUserIdentity() == null ? other.getUserIdentity() == null : this.getUserIdentity().equals(other.getUserIdentity()))
            && (this.getDepartIds() == null ? other.getDepartIds() == null : this.getDepartIds().equals(other.getDepartIds()))
            && (this.getRelTenantIds() == null ? other.getRelTenantIds() == null : this.getRelTenantIds().equals(other.getRelTenantIds()))
            && (this.getClientId() == null ? other.getClientId() == null : this.getClientId().equals(other.getClientId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getRealname() == null) ? 0 : getRealname().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
        result = prime * result + ((getGrade() == null) ? 0 : getGrade().hashCode());
        result = prime * result + ((getClazz() == null) ? 0 : getClazz().hashCode());
        result = prime * result + ((getTotal() == null) ? 0 : getTotal().hashCode());
        result = prime * result + ((getInnovation() == null) ? 0 : getInnovation().hashCode());
        result = prime * result + ((getThought() == null) ? 0 : getThought().hashCode());
        result = prime * result + ((getBodyMind() == null) ? 0 : getBodyMind().hashCode());
        result = prime * result + ((getLaw() == null) ? 0 : getLaw().hashCode());
        result = prime * result + ((getCultureSports() == null) ? 0 : getCultureSports().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getOrgCode() == null) ? 0 : getOrgCode().hashCode());
        result = prime * result + ((getOrgCodeTxt() == null) ? 0 : getOrgCodeTxt().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getThirdId() == null) ? 0 : getThirdId().hashCode());
        result = prime * result + ((getThirdType() == null) ? 0 : getThirdType().hashCode());
        result = prime * result + ((getActivitiSync() == null) ? 0 : getActivitiSync().hashCode());
        result = prime * result + ((getWorkNo() == null) ? 0 : getWorkNo().hashCode());
        result = prime * result + ((getPost() == null) ? 0 : getPost().hashCode());
        result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUserIdentity() == null) ? 0 : getUserIdentity().hashCode());
        result = prime * result + ((getDepartIds() == null) ? 0 : getDepartIds().hashCode());
        result = prime * result + ((getRelTenantIds() == null) ? 0 : getRelTenantIds().hashCode());
        result = prime * result + ((getClientId() == null) ? 0 : getClientId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", realname=").append(realname);
        sb.append(", password=").append(password);
        sb.append(", salt=").append(salt);
        sb.append(", avatar=").append(avatar);
        sb.append(", grade=").append(grade);
        sb.append(", clazz=").append(clazz);
        sb.append(", total=").append(total);
        sb.append(", innovation=").append(innovation);
        sb.append(", thought=").append(thought);
        sb.append(", bodyMind=").append(bodyMind);
        sb.append(", law=").append(law);
        sb.append(", cultureSports=").append(cultureSports);
        sb.append(", birthday=").append(birthday);
        sb.append(", sex=").append(sex);
        sb.append(", email=").append(email);
        sb.append(", phone=").append(phone);
        sb.append(", orgCode=").append(orgCode);
        sb.append(", orgCodeTxt=").append(orgCodeTxt);
        sb.append(", status=").append(status);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", thirdId=").append(thirdId);
        sb.append(", thirdType=").append(thirdType);
        sb.append(", activitiSync=").append(activitiSync);
        sb.append(", workNo=").append(workNo);
        sb.append(", post=").append(post);
        sb.append(", telephone=").append(telephone);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", userIdentity=").append(userIdentity);
        sb.append(", departIds=").append(departIds);
        sb.append(", relTenantIds=").append(relTenantIds);
        sb.append(", clientId=").append(clientId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}